package co.th.bjc.md.dao.impl;

import java.math.BigDecimal;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import co.th.bjc.md.dao.ProductDao;
import co.th.bjc.md.model.Product;

public class ProductDaoImpl extends HibernateDaoSupport implements ProductDao {

	@Override
	public Product findByID(BigDecimal id) throws Exception {
		Product product = (Product) getHibernateTemplate().get(Product.class, id);
		getHibernateTemplate().evict(product);
		return product;
	}

}
